# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: David Runge <dave@sleepmap.de>
# Contributor: Sander Jansen <sander@knology.net>

pkgname=gogglesmm
pkgver=1.2.3
pkgrel=1
pkgdesc="Music Manager and Player"
arch=('loong64' 'x86_64')
url="https://gogglesmm.github.io/"
license=('GPL3')
depends=('libepoxy'
         'glu'
         'libsm'
         'libxcursor'
         'libxrandr'
         'libxi'
         'libxft'
         'libvorbis'
         'libwebp'
         'libjpeg-turbo'
         'openssl'
         'libmad'
         'flac'
         'faad2'
         'opus'
         'taglib>=1.9.0'
         'sqlite'
         'dbus'
         'hicolor-icon-theme')
optdepends=('libpulse: PulseAudio Output'
            'alsa-lib: ALSA Output')
#'python2: import utilities'
makedepends=('cmake'
             'pkgconfig'
             'alsa-lib'
             'libpulse')
source=("$pkgname-$pkgver.tar.gz::https://github.com/gogglesmm/gogglesmm/archive/$pkgver.tar.gz"
         fix-build.patch)
sha512sums=('f6737e0bc01ebb889cc1086cc39485997957d436cb114ef9171bbd5aa4e2607707a98a49094a9dab0cdca151b94ac833c8dcd2fca98d0e3d66a33466f3e9b8ea'
            '87a027af5d6c51d494c035f183cf35ee20e8a11437b1c20f0328a7ef8e14f4b1b0bcc963b5d9464ad2185ab7b626d442c411a95d6eec40b3a2a9fba2dc6b6b64')

prepare() {
  cd "${pkgname}-${pkgver}"
#  patch -p1 < ../fix-build.patch
}

build() {
  cd "${pkgname}-${pkgver}"
  cmake . \
        -DCMAKE_INSTALL_PREFIX=/usr
  make
}

package() {
  cd "${pkgname}-${pkgver}"
  make DESTDIR="$pkgdir" install
}
